<div class="common">
    <div class="tool">
        <button type="button" class="btn btn-default" ng-click="showModal()">新增数据</button>
    </div>
    <table class="table table-bordered table-responsive table-striped" ng-if="currentState!='briefing'&&currentState!='material'&&currentState!='apply'">
        <thead>
            <tr>
                <th>ID</th>
                <th>标题</th>
                <th>点击量</th>
                <th>信息来源</th>
                <th>录入时间</th>
                <th>编辑</th>
                <th>删除</th>
                <th>置顶</th>
                <th>查看</th>
            </tr>
        </thead>
        <tbody class="table-striped">
            <tr ng-repeat="item in data.newsList">
                <td>{{$index+1}}</td>
                <td>{{item.title}}</td>
                <td>{{item.pageViews}}</td>
                <td>{{item.informationSources}}</td>
                <td>{{item.createTime}}</td>
                <td class="text-center">
                    <a href="" ng-click="editData(item)">
                        <span class="text-warning glyphicon glyphicon-pencil"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="deleteData(item.id)">
                        <span class="text-danger glyphicon glyphicon-remove"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="topData(item.id)">
                        <span class="text-danger glyphicon glyphicon-arrow-up"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="viewData(item.id)">
                        <span class="text-danger glyphicon glyphicon-eye-open"></span>
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-bordered table-responsive table-striped" ng-if="currentState=='briefing'||currentState=='material'">
        <thead>
            <tr>
                <th>ID</th>
                <th>标题</th>
                <th>文件名称</th>
                <th>录入时间</th>
                <th>编辑</th>
                <th>删除</th>
                <th>置顶</th>
                <th>查看</th>
            </tr>
        </thead>
        <tbody class="table-striped">
            <tr ng-repeat="item in data.newsList" >
                <td>{{$index+1}}</td>
                <td>{{item.title}}</td>
                <td>{{item.detail}}</td>
                <td>{{item.createTime}}</td>
                <td class="text-center">
                    <a href="" ng-click="editData(item)">
                        <span class="text-warning glyphicon glyphicon-pencil"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="deleteData(item.id)">
                        <span class="text-danger glyphicon glyphicon-remove"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="topData(item.id)">
                        <span class="text-danger glyphicon glyphicon-arrow-up"></span>
                    </a>
                </td>
                <td class="text-center">
                    <a href="" ng-click="viewData(item.id)">
                        <span class="text-danger glyphicon glyphicon-eye-open"></span>
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-bordered table-responsive table-striped" ng-if="currentState=='apply'">
        <thead>
            <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>QQ</th>
                <th>所在地</th>
                <th>兴趣专业</th>
                <th>联系时间</th>
                <th>录入时间</th>
                <th>删除</th>
            </tr>
        </thead>
        <tbody class="table-striped">
            <tr ng-repeat="item in data.newsList" >
                <td>{{$index+1}}</td>
                <td>{{item.name}}</td>
                <td>{{item.mobile}}</td>
                <td>{{item.email}}</td>
                <td>{{item.qq}}</td>
                <td>{{item.address}}</td>
                <td>{{item.majorTypeId}}</td>
                <td>{{item.contentTime}}</td>
                <td>{{item.createTime}}</td>
                <td class="text-center">
                    <a href="" ng-click="deleteData(item.id)">
                        <span class="text-danger glyphicon glyphicon-remove"></span>
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
    <modal-directive data="modalData" status="{{status}}" type="{{type}}" url="{{url}}"></modal-directive>
    <pagination-directive></pagination-directive>
</div>